class IOFactory
  def initialize(name)
    @new_reader = self.class.const_get("#{name}Reader")
    @new_writer = self.class.const_get("#{name}Writer")
  end

  def new_reader
    @new_reader.new
  end

  def new_writer
    @new_writer.new
  end
end